package garage

import (
	"github.com/flipped-aurora/gin-vue-admin/server/api/v1"
	"github.com/flipped-aurora/gin-vue-admin/server/middleware"
	"github.com/gin-gonic/gin"
)

type GarageRouter struct {
}

// InitGarageRouter 初始化 garage表 路由信息
func (s *GarageRouter) InitGarageRouter(Router *gin.RouterGroup) {
	garageRouter := Router.Group("garage").Use(middleware.OperationRecord())
	garageRouterWithoutRecord := Router.Group("garage")
	var garageApi = v1.ApiGroupApp.GarageApiGroup.GarageApi
	{
		garageRouter.POST("createGarage", garageApi.CreateGarage)             // 新建garage表
		garageRouter.DELETE("deleteGarage", garageApi.DeleteGarage)           // 删除garage表
		garageRouter.DELETE("deleteGarageByIds", garageApi.DeleteGarageByIds) // 批量删除garage表
		garageRouter.PUT("updateGarage", garageApi.UpdateGarage)              // 更新garage表
	}
	{
		garageRouterWithoutRecord.GET("findGarage", garageApi.FindGarage)                   // 根据ID获取garage表
		garageRouterWithoutRecord.GET("getGarageList", garageApi.GetGarageList)             // 获取garage表列表
		garageRouterWithoutRecord.GET("getGarageListNoPage", garageApi.GetGarageListNoPage) // 获取garage表列表
	}
}
